// Particle.h

#ifndef _EFFECT_Particle_H_
#define _EFFECT_Particle_H_

#ifndef _CORE_std_H_
#include <core/std.h>
#endif

namespace Effect
{
	// Particle type
	enum kParticleTypes {
		kParticleTypeGravity,
		kParticleTypeRadial,
	};

	// structure that holds the location and size for each point sprite
	typedef struct {
		GLfloat	x;
		GLfloat y;
		GLfloat s;
		GLfloat t;
		Math::color4f color;
	} PointSprite;

	typedef struct {
		Math::vec2	vertex;
		Math::vec2	texture;
		Math::color4f color;
	} TexturedColoredVertex;

	typedef struct {
		TexturedColoredVertex bl;
		TexturedColoredVertex br;
		TexturedColoredVertex tl;
		TexturedColoredVertex tr;
	} ParticleQuad;

	class Particle
	{
	public:
		Particle();
		virtual ~Particle();

	public:
		
		Math::vec2		position;
		Math::vec2		direction;
		Math::vec2		startPos;
		Math::color4f	color;
		Math::color4f	deltaColor;
		GLfloat			rotation;
		GLfloat			rotationDelta;
		GLfloat			radialAcceleration;
		GLfloat			tangentialAcceleration;
		GLfloat			radius;
		GLfloat			radiusDelta;
		GLfloat			angle;
		GLfloat			degreesPerSecond;
		GLfloat			particleSize;
		GLfloat			particleSizeDelta;
		GLfloat			timeToLive;
	};

}; // namespace Effect


#endif // _EFFECT_Particle_H_